package com.nbcio.modules.erp.cart.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName cart_items
 */
@TableName(value ="cart_items")
public class CartItems implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 
     */
    private String cartId;

    /**
     * 商品ID
     */
    private String productId;

    /**
     * 下单商品数量
     */
    private BigDecimal quantity;

    /**
     * 下单商品单价
     */
    private BigDecimal price;

    /**
     * 下单商品图片
     */
    private String img;

    /**
     * 商品名称
     */

    private String productName;

    /**
     * 商品分类id
     */

    private String productClassId;

    /**
     * 商品分类名称
     */

    private String productClassName;

    private BigDecimal ngtorigprice;

    private BigDecimal ngtorigtaxprice;

    private BigDecimal ntax;

    private BigDecimal ntaxrate;

    /**
     * 
     */
    private Date createdAt;

    /**
     * 
     */
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public String getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getCartId() {
        return cartId;
    }

    /**
     * 
     */
    public void setCartId(String cartId) {
        this.cartId = cartId;
    }

    /**
     * 商品ID
     */
    public String getProductId() {
        return productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * 商品ID
     */
    public void setProductId(String productId) {
        this.productId = productId;
    }

    /**
     * 下单商品数量
     */
    public BigDecimal getQuantity() {
        return quantity;
    }

    /**
     * 下单商品数量
     */
    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    /**
     * 
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    /**
     * 
     */
    public Date getUpdatedAt() {
        return updatedAt;
    }

    public String getProductClassId() {
        return productClassId;
    }

    public String getProductClassName() {
        return productClassName;
    }

    public void setProductClassId(String productClassId) {
        this.productClassId = productClassId;
    }

    public void setProductClassName(String productClassName) {
        this.productClassName = productClassName;
    }

    public BigDecimal getNgtorigprice() {
        return ngtorigprice;
    }

    public void setNgtorigprice(BigDecimal ngtorigprice) {
        this.ngtorigprice = ngtorigprice;
    }

    public BigDecimal getNgtorigtaxprice() {
        return ngtorigtaxprice;
    }

    public void setNgtorigtaxprice(BigDecimal ngtorigtaxprice) {
        this.ngtorigtaxprice = ngtorigtaxprice;
    }

    public BigDecimal getNtax() {
        return ntax;
    }

    public void setNtax(BigDecimal ntax) {
        this.ntax = ntax;
    }

    public BigDecimal getNtaxrate() {
        return ntaxrate;
    }

    public void setNtaxrate(BigDecimal ntaxrate) {
        this.ntaxrate = ntaxrate;
    }

    /**
     * 
     */
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CartItems other = (CartItems) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCartId() == null ? other.getCartId() == null : this.getCartId().equals(other.getCartId()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getQuantity() == null ? other.getQuantity() == null : this.getQuantity().equals(other.getQuantity()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCartId() == null) ? 0 : getCartId().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getQuantity() == null) ? 0 : getQuantity().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cartId=").append(cartId);
        sb.append(", productId=").append(productId);
        sb.append(", quantity=").append(quantity);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}